﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Framework
{
    public class RoutedEvent
    {
    }

    public delegate void RoutedEventHandler(Object sender, RoutedEventArgs e);

    public class RoutedEventArgs : EventArgs
    {
        public object OriginalSource { get; internal set; }
    }

    [Map("Cursor")]
    [Map("Cursors")]
    public sealed class Cursor
    {
        public static Cursor Default;
        public static Cursor Arrow;
        public static Cursor Hand;
        public static Cursor Wait;
        public static Cursor IBeam;
        public static Cursor Stylus;
        public static Cursor Eraser;
        public static Cursor SizeNS;
        public static Cursor SizeNWSE;
        public static Cursor SizeWE;
        public static Cursor None;
    }
    
    public enum CursorType
    {
        Default,
        Arrow,
        Hand,
        Wait,
        IBeam,
        Stylus,
        Eraser,
        SizeNS,
        SizeNWSE,
        SizeWE,
        None
    }

    public interface ICommand {

        bool CanExecute (Object parameter);

        void Execute (Object parameter);

        event EventHandler CanExecuteChanged;
    }

    public enum Key {
        None,
        Back,
        Tab,
        Enter,
        Shift,
        Ctrl,
        Alt,
        CapsLock,
        Escape,
        Space,
        PageUp,
        PageDown,
        End,
        Home,
        Left,
        Up,
        Right,
        Down,
        Insert,
        Delete,
        D0,
        D1,
        D2,
        D3,
        D4,
        D5,
        D6,
        D7,
        D8,
        D9,
        A,
        B,
        C,
        D,
        E,
        F,
        G,
        H,
        I,
        J,
        K,
        L,
        M,
        N,
        O,
        P,
        Q,
        R,
        S,
        T,
        U,
        V,
        W,
        X,
        Y,
        Z,
        F1,
        F2,
        F3,
        F4,
        F5,
        F6,
        F7,
        F8,
        F9,
        F10,
        F11,
        F12,
        NumPad0,
        NumPad1,
        NumPad2,
        NumPad3,
        NumPad4,
        NumPad5,
        NumPad6,
        NumPad7,
        NumPad8,
        NumPad9,
        Multiply,
        Add,
        Subtract,
        Decimal,
        Divide,
        Unknow
    }

    public static class Keyboard {

        public static ModifierKeys Modifiers { get; private set; }
    }

    public enum KeyboardNavigationMode {
        Local,
        Cycle,
        Onc
    }

    public sealed class KeyEventArgs : RoutedEventArgs
    {

        public bool Handled;
        public Key Key;
        public int PlatformKeyCode;
    }

    public delegate void KeyEventHandler(Object sender,	KeyEventArgs e);

    [FlagsAttribute]
    public enum ModifierKeys {
        None,
        Alt,
        Control,
        Shift,
        Windows,
        Appl
    }

    public class MouseEventArgs : RoutedEventArgs {

        public Point GetPosition(UIElement relativeTo) {
            throw new NotImplementedException();
        }
    }

    public delegate void MouseEventHandler(Object sender, MouseEventArgs e);

    public sealed class MouseButtonEventArgs : MouseEventArgs
    {

        public bool Handled;
    }

    public delegate void MouseButtonEventHandler(Object sender,	MouseButtonEventArgs e);

    public sealed class MouseWheelEventArgs : MouseEventArgs
    {

        public int Delta;
        public bool Handled;
    }

    public delegate void MouseWheelEventHandler(Object sender,MouseWheelEventArgs e);

    public delegate void DragEventHandler(Object sender,DragEventArgs e);

    public sealed class DragEventArgs : RoutedEventArgs
    {
        public IDataObject Data { get; internal set; }
        public bool Handled { get; set; }

    }

    public interface IDataObject
    {
        
    }

    public delegate void TextCompositionEventHandler(Object sender,TextCompositionEventArgs e);

    public sealed class TextCompositionEventArgs : RoutedEventArgs
    {
        public bool Handled { get; set; }
        public string Text { get; internal set;  }
        public TextComposition TextComposition { get; internal set; }

    }

    public sealed class TextComposition
    {
        public string CompositionText { get; internal set; }

    }

    public class ValidationErrorEventArgs : RoutedEventArgs
    {
        public ValidationErrorEventAction Action { get; internal set; }
        public ValidationError Error { get; internal set; }
        public bool Handled { get; set; }

    }

    public class ValidationError
    {
        public Object ErrorContent { get; private set; }
        public Exception Exception { get; private set; }

    }

    public enum ValidationErrorEventAction
    {
        Added, Removed
    }

    public delegate void SizeChangedEventHandler(Object sender,SizeChangedEventArgs e);

    public sealed class SizeChangedEventArgs : RoutedEventArgs
    {
        public Size NewSize { get; internal set; }
        public Size PreviousSize { get; internal set; }

    }

    public sealed class InputMethod : Base
    {
        public static bool GetIsInputMethodEnabled(Base target)
        {
            throw new NotImplementedException();
        }

        public static ImeConversionModeValues GetPreferredImeConversionMode(Base target)
        {
            throw new NotImplementedException();
        }

        public static InputMethodState GetPreferredImeState(Base target)
        {
            throw new NotImplementedException();
        }

        public static void SetIsInputMethodEnabled(Base target,bool value)
        {
            
        }
        public static void SetPreferredImeConversionMode(Base target,ImeConversionModeValues value)
        {
            
        }

        public static void SetPreferredImeState(Base target,InputMethodState value)
        {
            
        }
    }

    public enum ImeConversionModeValues
    {
        Alphanumeric,Native,Katakana,FullShape,Roman,CharCode,NoConversion,Eudc,Symbol,Fixed,DoNotCare 
    } 

    public enum InputMethodState
    {
        Off, On,DoNotCare 
    }
 




}
